import java.io.FileWriter;
import java.io.IOException;

/**
 * @ClassName Demo06_FWWriteAppendAndNewline
 * @Description TODO
 * @Author Li
 * @Date 2022/8/11 14:39
 * @ModifyDate 2022/8/11 14:39
 * @Version 1.0
 */
public class Demo06_FWWriteAppendAndNewline {
    public static void main(String[] args) throws IOException {
        // 使用文件名称创建流对象
        FileWriter fw = new FileWriter("src/part09/ch03_CharacterStream/g.txt");

        // 写出字符串
        fw.write("青山有幸埋忠骨");
        // 写出换行
        fw.write("\r\n");
        // 写出字符串
        fw.write("白铁无辜铸佞臣");

        // 关闭资源
        fw.close();
    }
}
